let test_program = Program(
	Var(DInt, "y"),
		BlockSeq(
		DecBlock(
						Var(DInt, "z"),
						BlockSeq(
					DecBlock(
						Var(DInt, "z"),
						Com(Skip)
						),
					Com(AssignVar("y", Val "z"))
					)
					),
		Com(AssignVar("y", N 5)))
		);;

let (t_star, f_list) = label_all_program test_program;;
let d_list = snd (get_definitions t_star (-1000) (emptydefenv(), []));;
 let f = flow t_star;;
let v_list = get_unbound_def d_list;; 
let a_list = gen_label_block_ass t_star;;
rd_entry 17 15 t_star v_list f a_list d_list [];;
rd_exit 17 15 t_star v_list f a_list d_list [];;

(snd((List.find(fun (l,b) -> ( l=17))  a_list)))
gen_rd (StCom (21, AssignVar ("y", N 8))) 19 d_list
kill_rd (StCom (24, Skip)) 22 d_list
gen_rd_entries t_star f v_list a_list d_list

get_entries 21 f

check_tree t_star v_list

(*ci serve una funzione che per ogni assegnamento ci dia la variabile*block_id usata dall'istruzione considerata*)
(*fun label -> ide*block_id*)